<extend name="Index::index"/>
<block name="title"><title>电影管理</title></block>
<block name="main">
<!--右内容区域-->
            <div class="layout-content">

                <div class="page-title">电影管理</div>

                <div class="content-top">
                    <ul class="top-nav">
                        <li class="active"><span>电影列表</span></li>
                    </ul>
                    <div class="clearfix"></div>
                </div>


                <!--content-main start-->
                <div class="container-fluid content-main">
                    <div class="row">
                        <div class="col-md-12">
                            <?php if(isset($_SESSION['message']))
                            {
                                $message=$_SESSION['message'];
                                unset($_SESSION['message']);
                            ?>
                            <div class="ui-tips bg-info">
                                <span class="icon glyphicon glyphicon-info-sign"></span>
                                <span><?php echo $message;?></span>
                            </div>
                            <?php }?>
                        </div>

                            <form action="{:U('index')}" method="get" class="form-inline form-search mt15">
                                <div class="form-group">
                                    <label>关键字搜索</label>
                                    <input type="text" placeholder="电影名称" value="{$name}" class="form-control input-sm" name="name"/>
                                </div>

                                <div>
                                    <button type="submit" class="btn btn-success btn-sm">
                                        <span class="glyphicon glyphicon-search"></span> 搜索
                                    </button>
                                </div>
                            </form>

                            <div class="mt15 pr15">
                                <a href="{:U('add')}" class="btn btn-sm btn-success pull-right"><span
                                        class="glyphicon glyphicon-plus"></span> 添加记录</a>

                                <div class="clearfix"></div>
                            </div>

                            <table class="table table-hover mt15">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>电影名称</th>
                                    <th>封面图片</th>
                                    <th>简介</th>
                                    <th>评分</th>
                                    <th>演员列表</th>
                                    <th>上映时间</th>
                                    <th>电影时长</th>
                                    <th>标签</th>
                                    <th>语言</th>
                                    <th width="120">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <foreach name="list" item="val">
                                <tr>
                                    <td>{$val['id']}</td>
                                    <td>{$val['name']}</td>
                                    <td><img src="__ROOT__{$val['cover']}"/></td>
                                    <td>{$val['summary']}</td>
                                    <td>{$val['score']}</td>
                                    <td>{$val['actore']}</td>
                                    <td>{$val['release_at']}</td>
                                    <td>{$val['long']}分钟</td>
                                    <td>{$val['tags']}</td>
                                    <td>{$val['language']}</td>
                                    <td>
                                        <a href="{:U('update',['id'=>$val['id']])}">修改</a>
                                    </td>
                                </tr>
                                </foreach>
                                </tbody>
                            </table>

                            <div class="pull-right">
                                {$page}
                                <!-- <span>共 100 条记录 </span>
                                 <span>每页 20 条</span>
                                 <span class="pagination">
                                     <span class="prev-page disabled">上一页</span>
                                     <span class="active">1</span>
                                     <a href="">2</a>
                                     <a href="">3</a>
                                     <a href="" class="next-page">下一页</a>
                                 </span>-->
                            </div>
                            <div class="clearfix"></div>

                        </div>
                    </div>

                </div>
                <!--content-main end-->

            </div>
            <!--右内容区域结束-->
</block>